using System.Collections.Generic;
using System.Linq;

namespace MathService.Values
{
    public class LamdaSetOf<T> : AbstractSetOf<T>
    {
        private readonly IEnumerable<T> f_Enimerable;

        public override int Power { get { return f_Enimerable.Count(); } }

        public LamdaSetOf(IEnumerable<T> enimerable) { f_Enimerable = enimerable; }

        public override IEnumerator<T> GetEnumerator() { return f_Enimerable.GetEnumerator(); }
    }
}